<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" pageEncoding="UTF-8"
		 contentType="text/html;charset=utf-8"%>
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
	<meta name="format-detection" content="telephone=no,address=no,email=no"/>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<title>KAA电商管理后台_人员管理</title>
	<script type="text/javascript" src="${path}/js/jquery-2.1.1.min.js"></script>
	<script src="${path}/js/sidebar-menu.js"></script>
	<link href="${path}/css/login.css" rel="stylesheet" media="all">
	<link rel="shortcut icon" href="${path}/img/favicon.png">
</head>
<body class="main">
	<h1>KAA电商管理后台</h1>
	<jsp:include page="sidebarNav.jsp"></jsp:include><!-- main_sidebar -->

	<div class="main_con_wrap">
		<div class="main_con homebanner_adm">
				<p class="outline_in"><a href="${path}/bannerAdd" class="goedit_but">添加广告位</a></p>
				<table border="0" width="100%" align="center" id="homebanner_table" class="homebanner_table">
					<tr>
						<%--<th>进入编辑</th>--%>
						<th>图片</th>
						<th>名称</th>
						<th>操作</th>
					</tr>
					<c:forEach items="${advertisementList}" var="items">
					<tr>
						<%--<td style="display:none;"><input type="checkbox" name="check[]"></td>--%>
						<%--<td><a href="../web/bannerEdit.html" class="goedit_but">点击编辑</a></td>--%>
						<td><img src="${path}/${items.picture}" height="50" width="90"></td>
						<td><span>${items.adName}</span><input type="text" style="display:none;"></td>
						<td class="last_td two_input">
							<a href="${path}/bannerEdit?advertisementId=${items.id}" class="edit_but" type="button">编辑</a>
						<input class="del_but" value="删除" onclick="del(${items.id})" type="button">
						</td>
					</tr>
					</c:forEach>
				</table>
		</div><!-- main_con -->
	</div><!-- main_con_wrap -->
<form id="form2" name="form2" action="${path}/deleteAdvertisement" method="post">
	<input id="adId" name="adId" style="display: none" value="">
</form>
	<div class="footer_copyright">
		<p>苏州知行合一网络科技有限公司提供技术支持，版权所有</p>
	</div><!-- footer_copyright -->

<script>
	/////////////////////////侧边栏按钮
	$.sidebarMenu($('.sidebar-menu'))

    ///////////////////////// Table
			//Create TR

	function del(value) {
		$("#adId").val(value);
		document.getElementById("form2").submit();
    }
</script>
</body>
</html>